package com.huangxt.test.exception;

import java.util.ArrayList;
import java.util.List;

public class ReturnFinally {
    public static void main(String[] args) {
        System.out.println(ReturnFinally.doSomething());
        List<String> list ;
        List list2 = new ArrayList();
        list2.add(1);
        list = list2;
        System.out.println((Object)list.get(0));

    }
    public static String doSomething(){
        try {
            return doSomething2();
        } finally {
            System.out.println("b");
        }
    }
    public static String doSomething2(){
        System.out.println("a");
        return "a";
    }
}
